<%@ Import Namespace="Curriculum.Modelo.Clases" %>
<%@ Import Namespace="Curriculum.Modelo.Enum" %>
<%@ Register TagPrefix="cc1" Namespace="Pluspetrol.Core.UIControls.WebControls" Assembly="Pluspetrol.Core.UIControls" %>
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="ListadoConcursos.ascx.cs" Inherits="ConcursoCV.UI.WebUserControls.Concurso.ListadoConcursos" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<table cellSpacing="-1" cellPadding="-1" width="100%">
	<tr>
		<td class="titulo_1">&nbsp;<asp:Label ID="lblTituloPantalla" Runat="server"></asp:Label></td>
	</tr>
	<tr>
		<td>
			<table cellSpacing="0" cellPadding="0" width="100%">
				<tr>
					<td colSpan="7">&nbsp;</td>
				</tr>
				<tr>
					<td width="15%">&nbsp;</td>
					<td colSpan="5"><asp:validationsummary id="valSum" Runat="server"></asp:validationsummary></td>
					<td width="15%">&nbsp;</td>
				</tr>
				<tr>
					<td width="15%">&nbsp;</td>
					<td class="label" width="10%">Fecha&nbsp;:</td>
					<td width="24%"><cc1:cdatepicker id="dtpFecha" Width="50%" runat="server" CssClass="controles"></cc1:cdatepicker>&nbsp;<asp:regularexpressionvalidator id="revActDate" runat="server" CssClass="asteriskError" ValidationExpression="^((31(?!/(02|04|06|09|11)))|((30|29)(?!/02))|(29(?=/02/(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))|(0?[1-9])|1\d|2[0-8])/(0[1-9]|1[0-2])/((1[6-9]|[2-9]\d)\d{2})$"
							ControlToValidate="dtpFecha" ErrorMessage="Ingrese una fecha valida.">*</asp:regularexpressionvalidator></td>
					<td width="2%">&nbsp;</td>
					<td class="label" width="10%">Nombre :</td>
					<td width="24%"><asp:textbox id="txtNombre" Width="100%" runat="server" CssClass="controles"></asp:textbox></td>
					<td width="15%">&nbsp;</td>
				</tr>
				<tr>
					<td class="espacio" colSpan="7">&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td class="label">Departamento&nbsp;:</td>
					<td><asp:dropdownlist id="ddlDepartamento" Width="65%" runat="server"></asp:dropdownlist></td>
					<td>&nbsp;</td>
					<td class="label">Area:</td>
					<td><asp:dropdownlist id="ddlArea" Width="100%" runat="server"></asp:dropdownlist></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td colSpan="7">&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td align="right" colSpan="5"><asp:button id="btnBuscar" Runat="server" CssClass="boton" Text="Buscar"></asp:button>&nbsp;&nbsp;<asp:button id="btnLimpiar" Runat="server" CssClass="boton" Text="Limpiar"></asp:button></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td colSpan="7">&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="espacio">&nbsp;</td>
	</tr>
	<tr>
		<td class="separador">&nbsp;</td>
	</tr>
	<tr>
		<td class="titulo_2">Listado de Concursos</td>
	</tr>
	<tr>
		<td><asp:datagrid id="dtgConcursos" Width="100%" runat="server" AutoGenerateColumns="False">
				<AlternatingItemStyle CssClass="AlternatingItemStyle"></AlternatingItemStyle>
				<ItemStyle CssClass="ItemStyle"></ItemStyle>
				<HeaderStyle CssClass="HeaderGrid"></HeaderStyle>
				<Columns>
					<asp:BoundColumn Visible="False" DataField="Id" HeaderText="Id"></asp:BoundColumn>
					<asp:TemplateColumn HeaderText="Fecha" ItemStyle-Width="7%" SortExpression="Fecha" HeaderStyle-HorizontalAlign="Center">
						<ItemTemplate>
							<%# ((DateTime)DataBinder.Eval(Container, "DataItem.Fecha")).ToString("dd/MM/yyyy") %>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:BoundColumn DataField="Nombre" HeaderText="Nombre"></asp:BoundColumn>
					<asp:TemplateColumn HeaderText="Estado" ItemStyle-Width="7%" SortExpression="Departamento" HeaderStyle-HorizontalAlign="Center">
						<ItemTemplate>
							<%# EstadoConcursoConverter.ObtenerDescripcion((EstadoConcurso)DataBinder.Eval(Container, "DataItem.Estado")) %>
						</ItemTemplate>
						<ItemStyle HorizontalAlign="Center" Width="12%"></ItemStyle>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Departamento" ItemStyle-Width="7%" SortExpression="Departamento" HeaderStyle-HorizontalAlign="Center">
						<ItemTemplate>
							<%# ((Lookup)DataBinder.Eval(Container, "DataItem.Departamento")).Descripcion.ToString() %>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Area" ItemStyle-Width="7%" SortExpression="Area" HeaderStyle-HorizontalAlign="Center">
						<ItemTemplate>
							<%# ((Lookup)DataBinder.Eval(Container, "DataItem.Area")).Descripcion.ToString() %>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Ver">
						<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
						<ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton ID="btnView" CommandName="Ver" Runat="server" ImageUrl="../../img/icons/VIEWITEM.GIF"></asp:ImageButton>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Modificar">
						<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
						<ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton ID="btnModify" CommandName="Modificar" Runat="server" ImageUrl="../../img/icons/EDITITEM.GIF"></asp:ImageButton>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Estructura">
						<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
						<ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton ID="btnEstructura" CommandName="Estructura" Runat="server" ImageUrl="../../img/icons/STRUCTURE.GIF"></asp:ImageButton>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Postulantes">
						<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
						<ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton ID="btnPostulantes" CommandName="Postulantes" Runat="server" ImageUrl="../../img/icons/USR.GIF"></asp:ImageButton>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Ranking">
						<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
						<ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton ID="btnRanking" CommandName="Ranking" Runat="server" ImageUrl="../../img/icons/RANKING.GIF"></asp:ImageButton>
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Eliminar">
						<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
						<ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
						<ItemTemplate>
							<cc1:ConfirmImageButton id="btnDelete" runat="server" CommandName="Eliminar" ImageUrl="../../img/icons/DELETEITEM.GIF"
								ToolTip="Eliminar" ConfirmMessage="&iquest;Est&aacute; seguro que desea eliminar el Concurso?"></cc1:ConfirmImageButton>
						</ItemTemplate>
					</asp:TemplateColumn>
				</Columns>
			</asp:datagrid></td>
	</tr>
	<tr>
		<td class="bordeGrillaDeAbajo" align="right">
			<table cellSpacing="0" cellPadding="0" width="100%">
				<tr>
					<td align="left">&nbsp; # Cantidad de registros:
						<asp:label id="lblCount" runat="server"></asp:label></td>
					<td align="right"><asp:button id="btnNew" runat="server" CssClass="boton" Text="Nuevo Concurso"></asp:button></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
